
// XXX
//  The idea is that all APIs that we expose are in this directory, possibly alongside supporting
//  resources. They get copied on build (TODO). We have helpers to make it easy to expose them
//  at the right security level (for nsISecurityCheckedComponent, nsIClassInfo, etc. on top of
//  the regular XPCOM helpers that are needed anyway).
//  So the below is not what it ought to look like. But it's a start!

function WidgetAPI (cfg) {
    this.cfg = cfg;
}
WidgetAPI.prototype = {
    // these are just the basic fields
    get author      () { return this.cfg.authorName; },
    get authorEmail () { return this.cfg.authorEmail; },
    get authorHref  () { return this.cfg.authorHref; },
    get description () { return this.cfg.description; },
    get id          () { return this.cfg.id; },
    get name        () { return this.cfg.name; },
    get shortName   () { return this.cfg.shortName; },
    get version     () { return this.cfg.version; },

    // dynamic size of the window (who needs this, seriously)
    get height  () { return this.win.innerHeight; },
    get width   () { return this.win.innerWidth; },

    // XXX needs to be some sort of Storage (maybe we can emulate?)
    get preferences () { throw("preferences not implemented yet"); },
    
    openURL:    function (url) {
        // XXX
        throw("openURL not implemented yet");
    },
};
